<template>
    <div v-if="flag==false">
       密码： <input type="password" v-model="pwd1">
        确认密码：<input type="password" v-model="pwd2">
        <input type="button" value="提交" @click="send_pwd()">

    </div>
    
        <h1 v-else-if="flag==true">恭喜你。。修改密码成功</h1>
    
</template>
<script>
import {user_pwd_reset} from "./axios_api/api.js"
export default {
    name:"reset_pwd",
    data(){
        return{
            pwd1:"",
            pwd2:'',
            flag : false
        }
    },
    methods:{
        send_pwd(){
            var token = this.$route.query.token
            var data = {
                "password":this.pwd1,
                "token":token,
                "password2":pwd2
            }
            user_pwd_reset(data)
            .then(res=>{
                console.log(res)
            })
        }
    }
}
</script>